package com.mrduan.calculator.ui.calculator.base;

import com.shike.baselibrary.model.BaseBean;

/**
 * Created by snoopy on 2018/4/7.
 */

public class CalculatorBean extends BaseBean{

    public String number;
    public String operator;// "" , "+/-" "="
    public String result;
    public String payWay; // 支付途径
    public long time;

    public CalculatorBean() {

    }

    public CalculatorBean(String number, String operator, String result, String payWay, long time) {
        this.number = number;
        this.operator = operator;
        this.result = result;
        this.payWay = payWay;
        this.time = time;
    }

    public CalculatorBean(CalculatorBean bean) {
        this.number   = bean.number;
        this.operator = bean.operator;
        this.result   = bean.result;
        this.payWay = bean.payWay;
        this.time = bean.time;
    }

    /**
     * 恢复默认值
     */
    public void def() {
        number = "0";
        operator = "";
        result = "0";
        payWay = "";
        time = 0;
    }

    /**
     * 恢复默认值
     */
    public void def(String number) {
        this.number = number;
        operator = "";
        result = "0";
        payWay = "";
        time = 0;
    }

    /**
     * 恢复默认值
     */
    public void def(String number,String operator) {
        this.number = number;
        operator = operator;
        result = "0";
        payWay = "";
        time = 0;
    }

}
